//
//  CollectionViewCell.m
//  欢迎页面
//
//  Created by DWE _WODE on 16/8/16.
//  Copyright © 2016年 DWE _CTL. All rights reserved.
//

#import "CollectionViewCell.h"

@interface CollectionViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UIButton *button;
@end

@implementation CollectionViewCell

- (void)awakeFromNib
{
    [self.button addTarget:self action:@selector(clickButton) forControlEvents:UIControlEventTouchUpInside];
}

- (void)setUpImage:(NSString *)name displayButton:(BOOL)isDiaplay
{
    self.imageView.image = [UIImage imageNamed:name];
    self.button.hidden = isDiaplay;
}

- (void)clickButton
{
    if (_clickButtonBlock) _clickButtonBlock();
}

@end
